﻿<UserControl x:Class="Showroom.WP7.Sample2D"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480"
             xmlns:my="clr-namespace:SStuff.FlowControls;assembly=SStuff.FlowControls" xmlns:WP7="clr-namespace:Showroom.WP7">
    <UserControl.Resources>
        <Style TargetType="my:FlowItem2D"
               x:Key="empty2D">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="my:FlowItem2D">
                        <ContentPresenter />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <DataTemplate x:Key="itemTemplate">
            <my:InFlowContentControl Content="{Binding ColorName}"
                                     Background="{Binding Brush}"
                                     HeadingBackground="{Binding HeaderBrush}"
                                     Width="150"
                                     Height="150" />

        </DataTemplate>
    </UserControl.Resources>
        <UserControl.DataContext>
        <WP7:InCoverFlowContentControlSampleData />
    </UserControl.DataContext>
    <Grid x:Name="LayoutRoot">
        <my:FlowItemsControl2D   ItemsSource="{Binding Path=Items}"
                                 ItemTemplate="{StaticResource itemTemplate}"
                                 ItemContainerStyle="{StaticResource empty2D}"
                                 Margin="0,40" />
    </Grid>
</UserControl>
